package com.example.wyz.classplus.ui.adapter;

import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.example.wyz.classplus.R;
import com.example.wyz.classplus.ui.custom.CircleImageView;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * Created by 10153 on 2017/6/1.
 */

public class PrivateNoticeListAdapter extends RecyclerView.Adapter<PrivateNoticeListAdapter.MyViewHolder> {

    private OnClickListener mListener;

    private Context mContext;
    private List<?> mList = new ArrayList<>();

    public PrivateNoticeListAdapter(Context mContext) {
        this.mContext = mContext;
    }

    public PrivateNoticeListAdapter(Context mContext, List<?> mList) {
        this.mContext = mContext;
        this.mList = mList;
    }

    @Override
    public MyViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        View view = LayoutInflater
                .from(mContext).inflate(R.layout.item_message_normal, parent, false);
        return new MyViewHolder(view);
    }

    @Override
    public void onBindViewHolder(MyViewHolder holder, int position) {

    }

    @Override
    public int getItemCount() {
        //return mList.size();
        return 15;
    }

    interface OnClickListener{
        void onClick();
        void onLongClick();
    }

    static class MyViewHolder extends RecyclerView.ViewHolder{
        @BindView(R.id.im_item_header) CircleImageView mHeader;
        @BindView(R.id.tv_item_tab) TextView mTab;
        @BindView(R.id.tv_item_msg) TextView mMsg;
        @BindView(R.id.tv_item_time) TextView mTime;

        public MyViewHolder(View itemView) {
            super(itemView);
            ButterKnife.bind(this, itemView);
        }
    }
}
